package PTA.javajibenyufa;

import java.util.Arrays;
import java.util.Scanner;

public class ex01 {
    static int []t;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNextLine())
        {
            String line = sc.nextLine();
            switch (line) {
                case "fib":
                    getFib();
                    break;
                case "sort":
                   // getSort();
                    break;
                case "search":
                    getSearch(t);
                    break;
                case "getBirthDate":
                    BirthDate();
                    break;
                default:
                    System.out.println("exit");
                    System.exit(0);

            }

        }
        sc.close();
    }

    private static void BirthDate() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
int str = Integer.parseInt(line);
for(int i=0;i<str;i++){
    String birthid = sc.nextLine();
    System.out.println(birthid.substring(6,10)+"-"+birthid.substring(10,12)+"-"+birthid.substring(12,14));
}
    }

    private static void getSearch(int []t){
        Scanner sc= new Scanner(System.in);
        String numbstr = sc.nextLine();
        int numb = Integer.parseInt(numbstr);
        int index = Arrays.binarySearch(t,numb);
        if(index>=0){
            System.out.println(index);
        }else{
            System.out.println("-1");
        }

}
    /*private static int t[] void getSort() {
        Scanner sc=  new Scanner(System.in);
        String str = sc.nextLine();
        String s[] = str.split("\\s+");
        int t[] = new int[s.length];
        for(int i=0;i<s.length;i++){
            //把数字存入 数组
            t[i]=Integer.parseInt(s[i]);
        }
        Arrays.sort(t);//排序
        System.out.println(Arrays.toString(t));//输出内容

    }
*/
    private static void getFib() {
Scanner sc = new Scanner(System.in);
String ne = sc.nextLine();
int n=Integer.parseInt(ne);
        int num1=1;
        int num2=1;
     for(int i=1;i<=n;i++){
         if(i==1){
             System.out.printf(String.valueOf(num1));
         }else if(i==2){
             System.out.printf(" "+num2);
         }else if(i>=3){
             int temp = num1+num2;
             num1=num2;
             num2=temp;
             System.out.printf(" "+temp);
         }
     }
        System.out.println();
    }
}
